<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .div1{
            width: 300px;
            height: 300px;
            background-color: red;
            /*padding-left: 100px;*/
            /*padding-top: 100px;*/
            overflow: hidden;
        }
        .div2{
            width: 100px;
            height: 100px;
            background-color: yellow;
            margin-left: 100px;
            margin-top: 100px;
        }
    </style>
</head>
<body>
    <div class="div1">
        <div class="div2">

        </div>
    </div>
</body>
</html>